<template>
  <footer class="footer">
    <div class="i_maxW">
      <ul v-if="links.length" class="links clear">
        <li v-for="(item,key) in links.slice(0,5)" :key="key"><a :href="item.link_url">{{item.name}}</a></li>
      </ul>
		<foote />
    </div>
  </footer>
</template>

<script>
import foote from '../../common/footer';
export default {
  components: {
    foote
  },
  data() {
    return {
      links: []   // 存放友情链接信息的列表
    }
  },
  created() {
    // 获取友情链接
    this.get_links();
  },
  methods: {
    get_links() {
      let success = res => {
        // console.log(res)
        this.links = res.data;
      };
      this.$ajax({
        url: "/api/alumni/alumniLink",
        method: "get",
        params: {},
        func: { success: success }
      });
    }
  }
}
</script>


<style lang="scss">
.footer {
  background-color: #3a486f;
}
.links {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 78px;
  border-bottom: 1px dashed #697898;
  li {
    // flex:1;
    width: 238px;
    padding: 0 10px;
    height: 14px;
    font-size: 14px;
    line-height: 14px;
    color: #ffffff;
    letter-spacing: 0;
    text-align: center;
    border-right: 1px solid #979797;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    &:last-child {
      border-right: 0 none;
    }
    a {
      color: #ffffff;
      text-decoration: none;
    }
  }
}
</style>